USE [Training]
GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'dbo.Skill_SkillSet') AND type in (N'U'))

CREATE TABLE [dbo].[Skill_SkillSet](
	[SkillID] [int] NOT NULL,
	[SkillSetID] [int] NOT NULL,
	[RetrainFrequency] [int] NOT NULL
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Skill_SkillSet]  WITH CHECK ADD  CONSTRAINT [FK_Skill_SkillSet_Skill] FOREIGN KEY([SkillID])
REFERENCES [dbo].[Skill] ([SkillID])
GO

ALTER TABLE [dbo].[Skill_SkillSet] CHECK CONSTRAINT [FK_Skill_SkillSet_Skill]
GO

ALTER TABLE [dbo].[Skill_SkillSet]  WITH CHECK ADD  CONSTRAINT [FK_Skill_SkillSet_SkillSet] FOREIGN KEY([SkillSetID])
REFERENCES [dbo].[SkillSet] ([SkillSetID])
GO

ALTER TABLE [dbo].[Skill_SkillSet] CHECK CONSTRAINT [FK_Skill_SkillSet_SkillSet]
GO

